<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:p="http://www.netbeans.org/ns/project/1"
                xmlns:nbawproj="http://www.netbeans.org/ns/aribaweb-project/1"
                xmlns:xalan="http://xml.apache.org/xslt"
                exclude-result-prefixes="xalan p nbawproj">
    <xsl:output method="xml" indent="yes" encoding="UTF-8" xalan:indent-amount="4"/>
    <xsl:template match="/">

        <xsl:variable name="name" select="/p:project/p:configuration/nbawproj:data/nbawproj:name"/>
        <xsl:variable name="awhome" select="/p:project/p:configuration/nbawproj:data/nbawproj:awhome"/>
        <!-- Synch with build-impl.xsl: -->
        <!-- XXX really should translate all chars that are *not* safe (cf. PropertyUtils.getUsablePropertyName): -->
        <xsl:variable name="codename" select="translate($name, ' ', '_')"/>
        <project name="{$codename}">
            <xsl:attribute name="default">launch</xsl:attribute>
            <xsl:attribute name="basedir">.</xsl:attribute>
            <description>
                AribaWeb / Widgets application
            </description>
            <property environment="env"/>
            <property name="aw.home" location="{$awhome}"/>
            <property name="src.dir" location="src"/>
            <import file="${{aw.home}}/tools/build-widgets-app.xml"/>

            <xsl:comment><![CDATA[
                jar name, war name, defaulted by project name.
                web.xml and aribaweb.properties automatically generated
            ]]>
            </xsl:comment>

        </project>

    </xsl:template>

</xsl:stylesheet>

